package org.example.domain.order.entity;

import com.alibaba.cola.domain.Entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.example.domain.common.base.BaseEntity;

@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@ToString(doNotUseGetters = true)
public class OrderItemEntity extends BaseEntity<Long> {

    /**
     * 主键
     */
    private Long id;

    /**
     * 订单id
     */
    private Long orderId;

    /**
     * 订单号
     */
    private String orderNo;

    /**
     * 商品id
     */
    private Long itemId;

    /**
     * 商品名称
     */
    private String itemName;

    /**
     * 商品单价(单位：分)
     */
    private Long itemPrice;

    /**
     * 数量
     */
    private Integer quantity;

    @Override
    public Long getPrimaryId() {
        return id;
    }

    @Override
    public void setPrimaryId(Long id) {
        this.id = id;
    }
}
